﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace 立库托盘入库.bean
{
    class ChuankouSettingBean: INotifyPropertyChanged
    {
        String[] _baudRates = { "300", "600", "1200", "2400", "4800", "9600", "19200", "38400", "43000", "56000", "576000", "115200" };
        String[] _paritys = { "NONE", "ODD", "EVEN" };
        String[] _dataBitss = { "6", "7", "8" };
        String[] _stopBitss = { "None", "ONE", "TWo" };

        public String[] BaudRates
        {
            get { return _baudRates; }
            set { 
                _baudRates = value;
                RaisePropertyChanged("BaudRates");
            }
        }
        public String[] Paritys
        {
            get { return _paritys; }
            set {
                _paritys = value;
                RaisePropertyChanged("Paritys");
            }
        }
        public String[] DataBitss
        {
            get { return _dataBitss; }
            set { 
                _dataBitss = value;
                RaisePropertyChanged("DataBitss");
            }
        }
        public String[] StopBitss
        {
            get { return _stopBitss; }
            set { 
                _stopBitss = value;
                RaisePropertyChanged("StopBitss");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void RaisePropertyChanged(string PropertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(PropertyName));
            }
        }
    }
}
